export const demo1 = `<template>
  <div :class="isWookmarkLoad?'wookmarkLoad':'flex-row-stretch-between-wrap'">
    ...// 多个div
    <div class="margin10">
      <p>是否开启粘性定位</p>
      <el-switch
        @change="setPositionSticky"
        style="display: block"
        v-model="isPositionSticky"
        active-color="#13ce66"
        inactive-color="#ff4949"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </div>
    <div class="margin10">
      <p>是否开启瀑布流布局</p>
      <el-switch
        style="display: block"
        v-model="isWookmarkLoad"
        active-color="#13ce66"
        inactive-color="#ff4949"
        active-text="是"
        inactive-text="否">
      </el-switch>
    </div>
  </div>
</template>
<script>
  data(){
    return{
      isPositionSticky: false,
      isWookmarkLoad: false
    }
  },
  methods: {
    setPositionSticky() {
      let cssDom = document.getElementsByClassName('css')
      for(let i = 0; i < cssDom.length; i++){
        if(this.isPositionSticky){
          cssDom[i].style.position = 'sticky';
          cssDom[i].style.top = '0px';
        }else{
          cssDom[i].style.position = null
        }
      }
    }
  }
</script>`